GBML manual / Rooms

region_set_music

Gives the region the player is in another song and starts it now, the way music_fade_to changes a song. From then on that region plays the new song whenever the player walks into it. The change lasts for the rest of the game and is saved with the game, so a region whose music you changed after a story event stays changed when the game is loaded.

Syntax

region_set_music(m)

Arguments

NameType
msong

Returns

Nothing.

Description

Gives the region the player is in another song and starts it now, the way music_fade_to changes a song: the old song fades out and the new one fades in. From then on that region plays the new song whenever the player walks into it.

The change lasts for the rest of the game and is saved with the game, in the same place as what the world remembers (the Remembered things and the changed tiles). A region whose music you changed after a story event is still changed after the game is loaded. Only the songs your game has can be picked; pass nothing to give the region no song.

Inside a house the new song waits and plays when the player is back out in the region. Using this call makes the game keep one byte for each region.

Example

region_set_music(song_battle);

From now on the region the player is in plays the song called song_battle.

On the GBA

Only the songs your game has can be picked. Pass nothing to give the region no song. Inside a house the new song waits and plays when the player is back out in the region. Using this call makes the game keep one byte for each region.

See also: region_musicmusic_fade_toWhat a region does in the game